home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / DEF / Compile / play-file-p < prev   
Text File  |  1998-10-23  |  890b  |  46 lines

  1. play-file-p filename instrument sections &rest instruments sections
  2.  
  3. Plays instruments in sections to a file in the output folder and opens MidiShare Player. 
  4.  
  5. (def-orchestra 'orchestra
  6.    all-instruments (piano synth)
  7.    piano (left-hand right-hand)
  8. )
  9.  
  10. (def-grammar 'song
  11.    all-sections (intro middle ending)
  12.    intro (a b)
  13.    middle (am bm cm bm)
  14.    ending (ae be)
  15. )
  16.  
  17. (midiport :printer) ; or (midiport :modem)
  18.  
  19. (play-file-p "my song"
  20.    all-instruments '(all-sections)
  21. )
  22.  
  23. You can call it directly with individual sections. Let's say you have a section a defined.
  24.  
  25. (def-section sect-a
  26.    default
  27.       zone '(1/1 1/1)
  28.       tonality (activate-tonality (major c 4))
  29.       length '(1/16)
  30.       velocity '(64)
  31.    piano
  32.       symbol '(a b c)
  33.    synths
  34.       symbol '(-b -c -d)
  35. )
  36.  
  37. (midiport :printer) ; or (midiport :modem)
  38.  
  39. (play-file-p "my song"
  40.    piano '(sect-a)
  41.    synths '(sect-a)
  42. )
  43.  
  44.  
  45.  
  46.